package linc.spring.demo.processor;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.stereotype.Component;

/**
 * @author yqlin
 * @date 2021/9/7 01:41
 * @description BeanFactoryPostProcessor表示Bean工厂的后置处理器，其实和BeanPostProcessor类似，
 * BeanPostProcessor是干涉Bean的创建过程，
 * BeanFactoryPostProcessor是干涉BeanFactory的创建过程。比如，我们可以这样定义一个BeanFactoryPostProcessor
 */
@Component
public class CustomBeanFactoryPostProcessor implements BeanFactoryPostProcessor {
    @Override
    public void postProcessBeanFactory(ConfigurableListableBeanFactory configurableListableBeanFactory) throws BeansException {
        System.out.println("加工beanFactory");
    }
}
